
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.SystemColor;
import java.util.ArrayList;

import javax.swing.*;
import javax.swing.border.CompoundBorder;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

public class PendingRequestSubscripitionGUI  extends JFrame
{
	private JPanel contentPane=null;
	private JButton backButton = null;
	private JTable table=null;
	public PendingRequestSubscripitionGUI( )
	{
		 
		JPanel contentPane=new JPanel();
        
     	contentPane.setBorder(new TitledBorder(null, "Pending Request Subscripition", TitledBorder.LEADING, TitledBorder.TOP, null, null));
     
		        
		        table = new JTable();
		        table.setColumnSelectionAllowed(true);
		        table.setFillsViewportHeight(true);
		        table.setCellSelectionEnabled(true);
		        table.setSurrendersFocusOnKeystroke(true);
		        
		        table.setModel(new DefaultTableModel(
		        	new Object[][] {
		        		{null, null, null},
		        		{null, null, null},
		        		{null, null, null},
		        		{null, null, null},
		        	},
		        	new String[] {
		        		"Req. Number", "fName", "lName"
		        	}
		        ));
		        
		       
		        table.setBounds(0,0, 500-50, 150-165);
		        table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
		        table.setFont(table.getFont().deriveFont(11f));
		 	      
		       
		        table.setBackground(SystemColor.activeCaption);
		        table.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
		        table.setRowHeight(30);
		        
		        //Create a JScrollPane to contain for the JTable
		        JScrollPane sp = new JScrollPane();
		        sp.setViewportBorder(new CompoundBorder());
		        sp.setBounds(50, 83, 398, 261);
		        sp.setViewportView(table);
		        	     
		     
		        
		        JButton btnNewButton = new JButton("Open");
		        btnNewButton.setBounds(458, 110, 89, 23);
		        contentPane.add(btnNewButton);
		        
		        JButton btnNewButton_1 = new JButton("Open");
		        btnNewButton_1.setBounds(458, 144, 89, 23);
		        contentPane.add(btnNewButton_1);
		        
		        JButton btnNewButton_2 = new JButton("Open");
		        btnNewButton_2.setBounds(458, 178, 89, 23);
		        contentPane.add(btnNewButton_2);
		        
		        contentPane.add(geBackButton());
		       
		        
    
		          contentPane.setLayout(null);
			      contentPane.setOpaque(true);
			       contentPane.add(sp);
			       
			        
			        //Frame
			        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			        this.setTitle("Pending Request Subscripition Window");
			        this.setContentPane(contentPane);   
			        this.setLocationRelativeTo(null); //This will center the JFrame in the middle of the screen
		            this.setLocationByPlatform(true);
		            this.setSize(700, 700);
		            this.setVisible( true ); // display frame
	        	       
	  }
	
	
	/**
	 * This method initializes Back Button	
	 */
	private JButton geBackButton() {
		if (backButton == null) {
			backButton = new JButton();
			backButton.setBounds(new Rectangle(170, 380,150, 35));
			backButton.setText("Back to main");
			backButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					            
				
				}
			});
		}
		return backButton;
	}
	
	
}
